<?php
namespace App\Http\Requests\Api\PostsRequests;

use \App\Http\Requests\ApiRequest;

class CircleRequest extends ApiRequest
{

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'circle_name'=>'required|max:10',
            'circle_introduce' => 'required|max:200',
            'head_portrait' => 'required',
            'background_maps' => 'required',
            'plate_id' => 'required',
        ];
    }
    /**
     * 获取已定义验证规则的错误消息
     *
     * @return array
     */
    public function messages()
    {
        return [
            'circle_name.required'=>'名称不能为空',
            'circle_introduce.required' =>'介绍不能为空',
            'head_portrait.required'  => '头像不能为空',
            'background_maps.required' => '背景不能为空',
            'plate_id.required'  => '板块不能为空',
        ];
    }
    public $scenes = [
        'addMsg' => ['circle_name', 'circle_introduce','head_portrait','background_maps','plate_id'],
        'deleteMsg' =>['id']
    ];
}
